/*
 * table_Statement.h
 *
 *  Created on: 2012/05/03
 *      Author: guanxiaoying
 */

#ifndef TABLE_STATEMENT_H_
#define TABLE_STATEMENT_H_

typedef struct __STATEMENTACCESS{
	BOOL (*clear)( VOID );
	BOOL (*reset)( VOID );
	BOOL (*alloc)( AST );
	AST  (*getMax)( VOID );

	ACCESS_U2_FIELD  statmentKind;
	ACCESS_U2_FIELD  parentKind;

	ACCESS_IDX_FIELD for_Init_Decl;
	ACCESS_IDX_FIELD for_initExp;
	ACCESS_IDX_FIELD for_CondExp;
	ACCESS_IDX_FIELD for_IncExp;
	ACCESS_IDX_FIELD for_Body;

	ACCESS_IDX_FIELD label_name;
	ACCESS_IDX_FIELD label_statement;
	ACCESS_IDX_FIELD label_gotoChain;

	ACCESS_IDX_FIELD case_constExp;
	ACCESS_IDX_FIELD case_nextCase;
	ACCESS_IDX_FIELD case_statement;
	ACCESS_IDX_FIELD case_switch;

	ACCESS_IDX_FIELD default_statement;
	ACCESS_IDX_FIELD default_switch;

	ACCESS_IDX_FIELD dec_declaration;

	ACCESS_IDX_FIELD block_stmtlist;

	ACCESS_IDX_FIELD exp_exp;

	ACCESS_IDX_FIELD if_condExp;
	ACCESS_IDX_FIELD if_body;
	ACCESS_IDX_FIELD if_else_body;

	ACCESS_IDX_FIELD switch_condExp;
	ACCESS_IDX_FIELD switch_body;
	ACCESS_IDX_FIELD switch_firstCase;
	ACCESS_IDX_FIELD switch_default;

	ACCESS_IDX_FIELD while_condExp;
	ACCESS_IDX_FIELD while_body;

	ACCESS_IDX_FIELD do_body;
	ACCESS_IDX_FIELD do_condExp;

	ACCESS_IDX_FIELD goto_sym;
	ACCESS_IDX_FIELD goto_statement;

	ACCESS_IDX_FIELD continue_statement;

	ACCESS_IDX_FIELD break_statement;

	ACCESS_IDX_FIELD return_exp;

	ACCESS_IDX_FIELD codeScp;

	ACCESS_IDX_FIELD next;
	ACCESS_IDX_FIELD before;

	ACCESS_IDX_FIELD parent_Symbol;
	ACCESS_IDX_FIELD parent_statement;
	ACCESS_IDX_FIELD parent_expression;
	ACCESS_IDX_FIELD begin;
	ACCESS_IDX_FIELD end;

}STATEMENTACCESS;

extern const STATEMENTACCESS stStatementAccess;

#endif /* TABLE_STATEMENT_H_ */
